diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5b5364424154..3f0d97f11224 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -130286,360 +130286,6 @@ components: meta: $ref: "#/components/schemas/TeamsHierarchyLinksResponseMeta" type: object - TeamHierarchyMember: - description: A user relationship to the requested team. - properties: - attributes: - $ref: "#/components/schemas/TeamHierarchyMemberAttributes" - id: - description: Relationship identifier containing the team UUID and user UUID. - example: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000001 - type: string - relationships: - $ref: "#/components/schemas/TeamHierarchyMemberRelationships" - type: - $ref: "#/components/schemas/TeamHierarchyMemberType" - required: - - id - - type - - attributes - - relationships - type: object - TeamHierarchyMemberAttributes: - description: Membership attributes relative to the requested team. - properties: - direct_role: - description: "Role on the requested team: admin or member. Null for inherited members." - example: member - nullable: true - pattern: ^(admin|member)$ - type: string - is_direct: - description: Whether the user belongs directly to the requested team. - example: true - type: boolean - provisioned_by: - description: Membership provisioner. Null for inherited members. - example: manual - nullable: true - type: string - provisioned_by_id: - description: Identifier supplied by the membership provisioner. Null when unavailable or for inherited members. - example: - nullable: true - type: string - required: - - is_direct - - direct_role - - provisioned_by - - provisioned_by_id - type: object - TeamHierarchyMemberIncluded: - description: An included user or the requested team, distinguished by resource type. - oneOf: - - $ref: "#/components/schemas/TeamHierarchyMemberUser" - - $ref: "#/components/schemas/TeamHierarchyMemberTeam" - TeamHierarchyMemberRelationships: - description: User and requested team linkage. - properties: - team: - $ref: "#/components/schemas/TeamHierarchyMemberTeamRelationship" - user: - $ref: "#/components/schemas/TeamHierarchyMemberUserRelationship" - required: - - user - - team - type: object - TeamHierarchyMemberTeam: - description: The requested team, included at most once. Descendant teams are not included. - properties: - attributes: - $ref: "#/components/schemas/TeamHierarchyMemberTeamAttributes" - id: - description: UUID of the requested team. - example: 692e8073-12c4-4c71-8408-5090bd44c9c8 - format: uuid - type: string - type: - $ref: "#/components/schemas/TeamHierarchyMemberTeamType" - required: - - id - - type - type: object - TeamHierarchyMemberTeamAttributes: - description: Available attributes of the requested team. - properties: - handle: - description: Handle of the team. - example: platform - type: string - name: - description: Name of the team. - example: Platform - type: string - type: object - TeamHierarchyMemberTeamData: - description: Team resource identifier. - properties: - id: - description: UUID of the team. - example: 692e8073-12c4-4c71-8408-5090bd44c9c8 - format: uuid - type: string - type: - $ref: "#/components/schemas/TeamHierarchyMemberTeamType" - required: - - id - - type - type: object - TeamHierarchyMemberTeamRelationship: - description: Linkage to the requested team. - properties: - data: - $ref: "#/components/schemas/TeamHierarchyMemberTeamData" - required: - - data - type: object - TeamHierarchyMemberTeamType: - default: teams - description: Requested team resource type. - enum: - - teams - example: teams - type: string - x-enum-varnames: - - TEAMS - TeamHierarchyMemberType: - default: user_team_relationship - description: Team hierarchy membership resource type. - enum: - - user_team_relationship - example: user_team_relationship - type: string - x-enum-varnames: - - USER_TEAM_RELATIONSHIP - TeamHierarchyMemberUser: - description: A user included in the hierarchy members response. - properties: - attributes: - $ref: "#/components/schemas/UserAttributes" - id: - description: UUID of the user. - example: 00000000-0000-0000-0000-000000000001 - format: uuid - type: string - type: - $ref: "#/components/schemas/UsersType" - required: - - id - - type - - attributes - type: object - TeamHierarchyMemberUserData: - description: User resource identifier. - properties: - id: - description: UUID of the user. - example: 00000000-0000-0000-0000-000000000001 - format: uuid - type: string - type: - $ref: "#/components/schemas/UsersType" - required: - - id - - type - type: object - TeamHierarchyMemberUserRelationship: - description: Linkage to the user. - properties: - data: - $ref: "#/components/schemas/TeamHierarchyMemberUserData" - required: - - data - type: object - TeamHierarchyMembersNumberPage: - description: Pagination metadata using number and size. - properties: - first_number: - description: First page number. - example: 0 - format: int64 - type: integer - last_number: - description: Last page number. Null when unavailable. - example: 0 - format: int64 - nullable: true - type: integer - next_number: - description: Next page number. Null when unavailable. - example: - format: int64 - nullable: true - type: integer - number: - description: Current zero-based page number. - example: 0 - format: int64 - type: integer - prev_number: - description: Previous page number. Null when unavailable. - example: - format: int64 - nullable: true - type: integer - size: - description: Maximum number of members per page. - example: 100 - format: int64 - type: integer - total: - description: Total number of members matching the filters. - example: 2 - format: int64 - type: integer - type: - $ref: "#/components/schemas/TeamHierarchyMembersNumberPageType" - required: - - type - - number - - size - - total - - first_number - - prev_number - - next_number - - last_number - type: object - TeamHierarchyMembersNumberPageType: - default: number_size - description: Pagination mode. - enum: - - number_size - example: number_size - type: string - x-enum-varnames: - - NUMBER_SIZE - TeamHierarchyMembersOffsetPage: - description: Pagination metadata using offset and limit. - properties: - first_offset: - description: First offset. - example: 0 - format: int64 - type: integer - last_offset: - description: Last offset. Null when unavailable. - example: 0 - format: int64 - nullable: true - type: integer - limit: - description: Maximum number of members per page. - example: 100 - format: int64 - type: integer - next_offset: - description: Next offset. Null when unavailable. - example: - format: int64 - nullable: true - type: integer - offset: - description: Current offset. - example: 0 - format: int64 - type: integer - prev_offset: - description: Previous offset. Null when unavailable. - example: - format: int64 - nullable: true - type: integer - total: - description: Total number of members matching the filters. - example: 2 - format: int64 - type: integer - type: - $ref: "#/components/schemas/TeamHierarchyMembersOffsetPageType" - required: - - type - - offset - - limit - - total - - first_offset - - prev_offset - - next_offset - - last_offset - type: object - TeamHierarchyMembersOffsetPageType: - default: offset_limit - description: Pagination mode. - enum: - - offset_limit - example: offset_limit - type: string - x-enum-varnames: - - OFFSET_LIMIT - TeamHierarchyMembersPage: - description: Pagination metadata for the selected pagination mode. - oneOf: - - $ref: "#/components/schemas/TeamHierarchyMembersOffsetPage" - - $ref: "#/components/schemas/TeamHierarchyMembersNumberPage" - TeamHierarchyMembersResponse: - description: Direct and inherited members of the requested team. - properties: - data: - description: One relationship per user. - items: - $ref: "#/components/schemas/TeamHierarchyMember" - type: array - included: - description: Requested users and the team. May be absent when the result is empty, even if requested. - items: - $ref: "#/components/schemas/TeamHierarchyMemberIncluded" - type: array - links: - $ref: "#/components/schemas/TeamHierarchyMembersResponseLinks" - meta: - $ref: "#/components/schemas/TeamHierarchyMembersResponseMeta" - required: - - data - - meta - - links - type: object - TeamHierarchyMembersResponseLinks: - description: Page navigation links. Unavailable links are omitted. - properties: - first: - description: First page URL. - example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - type: string - last: - description: Last page URL. - example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - type: string - next: - description: Next page URL. - example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - type: string - prev: - description: Previous page URL. - example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - type: string - self: - description: Current page URL. - example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - type: string - type: object - TeamHierarchyMembersResponseMeta: - description: Pagination metadata for the filtered members. - properties: - page: - $ref: "#/components/schemas/TeamHierarchyMembersPage" - required: - - page - type: object TeamIncluded: description: Included resources related to the team oneOf: @@ -183972,9 +183618,10 @@ paths: tags: - AWS Integration "x-permission": - operator: OR + operator: AND permissions: - aws_configuration_edit + - cloud_cost_management_write x-unstable: |- **Note**: This endpoint is in preview and may be subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). @@ -184079,9 +183726,10 @@ paths: - AWS Integration x-codegen-request-body-name: body "x-permission": - operator: OR + operator: AND permissions: - aws_configuration_edit + - cloud_cost_management_write x-unstable: |- **Note**: This endpoint is in preview and may be subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). @@ -184145,9 +183793,10 @@ paths: - AWS Integration x-codegen-request-body-name: body "x-permission": - operator: OR + operator: AND permissions: - aws_configuration_edit + - cloud_cost_management_write x-unstable: |- **Note**: This endpoint is in preview and may be subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). @@ -244248,267 +243897,6 @@ paths: operator: OR permissions: - teams_read - /api/v2/team/{team_id}/members: - get: - description: |- - List the direct and inherited members of a team, deduplicated by user. - Members of descendant teams are included unless `filter[is_direct_only]` is true. - Datadog support users are always excluded. - - Use `page[number]` and `page[size]` to paginate through the results. - Invalid query parameters return a JSON:API error with status 400. - Invalid or unknown team UUIDs return status 404. - operationId: GetTeamHierarchyMembers - parameters: - - description: UUID of the requested root team. - in: path - name: team_id - required: true - schema: - example: 692e8073-12c4-4c71-8408-5090bd44c9c8 - type: string - - description: Return only direct members. By default, members inherited from descendant teams are also returned. - in: query - name: filter[is_direct_only] - required: false - schema: - default: false - example: false - type: boolean - - description: Include service accounts. Datadog support users are always excluded. - in: query - name: filter[include_service_accounts] - required: false - schema: - default: true - example: true - type: boolean - - description: Filter by a case-insensitive substring of the user name, handle, or email. - in: query - name: filter[keyword] - required: false - schema: - example: alice - type: string - - description: "Comma-separated resources to include: `user` and `team`. The included team is the requested team." - in: query - name: include - required: false - schema: - example: user,team - type: string - - description: "Comma-separated sort fields: `name`, `handle`, `is_direct`, and `provisioned_by`. Fields are applied in order, each optionally prefixed with `-` for descending order. By default, team admins come first, followed by other direct members, then inherited members, sorted by name within each group." - in: query - name: sort - required: false - schema: - example: is_direct,-name - type: string - - description: Zero-based page number. Negative values become 0. Defaults to 0. - in: query - name: page[number] - required: false - schema: - default: 0 - example: 0 - format: int64 - type: integer - - description: Members per page, from 1 to 100. Values outside this range use the default of 100. - in: query - name: page[size] - required: false - schema: - default: 100 - example: 100 - format: int64 - type: integer - responses: - "200": - content: - application/json: - examples: - default: - summary: Direct and inherited members with number pagination - value: - data: - - attributes: - direct_role: admin - is_direct: true - provisioned_by: manual - provisioned_by_id: - id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000001 - relationships: - team: - data: - id: 692e8073-12c4-4c71-8408-5090bd44c9c8 - type: teams - user: - data: - id: 00000000-0000-0000-0000-000000000001 - type: users - type: user_team_relationship - - attributes: - direct_role: - is_direct: false - provisioned_by: - provisioned_by_id: - id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000002 - relationships: - team: - data: - id: 692e8073-12c4-4c71-8408-5090bd44c9c8 - type: teams - user: - data: - id: 00000000-0000-0000-0000-000000000002 - type: users - type: user_team_relationship - links: - first: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - last: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - self: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - meta: - page: - first_number: 0 - last_number: 0 - next_number: - number: 0 - prev_number: - size: 100 - total: 2 - type: number_size - empty: - summary: No matching members, with included resources omitted - value: - data: [] - links: - first: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - last: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - self: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 - meta: - page: - first_number: 0 - last_number: 0 - next_number: - number: 0 - prev_number: - size: 100 - total: 0 - type: number_size - included_resources: - summary: Users and the team with number pagination - value: - data: - - attributes: - direct_role: admin - is_direct: true - provisioned_by: manual - provisioned_by_id: - id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000001 - relationships: - team: - data: - id: 692e8073-12c4-4c71-8408-5090bd44c9c8 - type: teams - user: - data: - id: 00000000-0000-0000-0000-000000000001 - type: users - type: user_team_relationship - - attributes: - direct_role: - is_direct: false - provisioned_by: - provisioned_by_id: - id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000002 - relationships: - team: - data: - id: 692e8073-12c4-4c71-8408-5090bd44c9c8 - type: teams - user: - data: - id: 00000000-0000-0000-0000-000000000002 - type: users - type: user_team_relationship - included: - - attributes: - email: alice@example.com - handle: alice@example.com - name: Alice - title: - id: 00000000-0000-0000-0000-000000000001 - type: users - - attributes: - email: bob@example.com - handle: bob@example.com - name: - title: - id: 00000000-0000-0000-0000-000000000002 - type: users - - attributes: - handle: platform - name: Platform - id: 692e8073-12c4-4c71-8408-5090bd44c9c8 - type: teams - links: - first: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?include=user%2Cteam&page%5Bnumber%5D=0&page%5Bsize%5D=100 - last: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?include=user%2Cteam&page%5Bnumber%5D=0&page%5Bsize%5D=100 - self: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?include=user%2Cteam&page%5Bnumber%5D=0&page%5Bsize%5D=100 - meta: - page: - first_number: 0 - last_number: 0 - next_number: - number: 0 - prev_number: - size: 100 - total: 2 - type: number_size - schema: - $ref: "#/components/schemas/TeamHierarchyMembersResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - teams_read - summary: Get team hierarchy members - tags: - - Teams - x-pagination: - limitParam: page[size] - pageParam: page[number] - resultsPath: data - x-permission: - operator: OR - permissions: - - teams_read - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/team/{team_id}/memberships: get: description: Get a paginated list of members for a team diff --git a/examples/v2/teams/GetTeamHierarchyMembers.rb b/examples/v2/teams/GetTeamHierarchyMembers.rb deleted file mode 100644 index 0f60e65d7fd2..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Get team hierarchy members returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] - -# there is a valid "user" in the system -USER_DATA_ATTRIBUTES_EMAIL = ENV["USER_DATA_ATTRIBUTES_EMAIL"] -opts = { - filter_keyword: USER_DATA_ATTRIBUTES_EMAIL, - include: "user,team", -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_1000871040.rb b/examples/v2/teams/GetTeamHierarchyMembers_1000871040.rb deleted file mode 100644 index 67977c6744be..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_1000871040.rb +++ /dev/null @@ -1,18 +0,0 @@ -# Get team hierarchy members paginates by number and size - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - sort: "-is_direct", - page_number: 1, - page_size: 1, -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_1140593961.rb b/examples/v2/teams/GetTeamHierarchyMembers_1140593961.rb deleted file mode 100644 index 0b9bb59d01fc..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_1140593961.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Get team hierarchy members normalizes number pagination - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - page_number: -1, - page_size: 101, -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_2494043793.rb b/examples/v2/teams/GetTeamHierarchyMembers_2494043793.rb deleted file mode 100644 index 037e549257e6..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_2494043793.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Get team hierarchy members filters names case insensitively - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "hIeRaRcHy MeMbEr", -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_3103330950.rb b/examples/v2/teams/GetTeamHierarchyMembers_3103330950.rb deleted file mode 100644 index 5dae75bdd03b..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_3103330950.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get team hierarchy members returns empty results - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "no-matching-member-Example-Team", - include: "user,team", -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_3197180671.rb b/examples/v2/teams/GetTeamHierarchyMembers_3197180671.rb deleted file mode 100644 index fb4f9fb4d336..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_3197180671.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Get team hierarchy members deduplicates direct and inherited membership - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - sort: "-is_direct,handle", - include: "team", -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_3330810309.rb b/examples/v2/teams/GetTeamHierarchyMembers_3330810309.rb deleted file mode 100644 index bb711c9516ae..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_3330810309.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get team hierarchy members includes inherited users with null root membership attributes - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - include: "user,team", -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_3355644561.rb b/examples/v2/teams/GetTeamHierarchyMembers_3355644561.rb deleted file mode 100644 index b1d2c2139e6d..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_3355644561.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Get team hierarchy members filters direct members - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - filter_is_direct_only: true, - filter_include_service_accounts: false, -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_3685423949.rb b/examples/v2/teams/GetTeamHierarchyMembers_3685423949.rb deleted file mode 100644 index 2af257c6faad..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_3685423949.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get team hierarchy members sorts inherited members before direct members - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - sort: "is_direct,-name", -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_4101380979.rb b/examples/v2/teams/GetTeamHierarchyMembers_4101380979.rb deleted file mode 100644 index 8a5d9036f8e5..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_4101380979.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get team hierarchy members selects number pagination from page size alone - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - page_size: 1, -} -p api_instance.get_team_hierarchy_members(DD_TEAM_DATA_ID, opts) diff --git a/examples/v2/teams/GetTeamHierarchyMembers_4182775736.rb b/examples/v2/teams/GetTeamHierarchyMembers_4182775736.rb deleted file mode 100644 index fd6ea01a32fd..000000000000 --- a/examples/v2/teams/GetTeamHierarchyMembers_4182775736.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Get team hierarchy members returns "OK" response with pagination - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] - config.unstable_operations["v2.get_team_hierarchy_members".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TeamsAPI.new - -# there is a valid "dd_team" in the system -DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -opts = { - filter_keyword: "Example-Team", - page_size: 1, -} -api_instance.get_team_hierarchy_members_with_pagination(DD_TEAM_DATA_ID, opts) { |item| puts item } diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index ba73fbc98163..1377d926590b 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -7010,16 +7010,6 @@ "link_id" => "String", "body" => "TeamLinkCreateRequest", }, - "v2.GetTeamHierarchyMembers" => { - "team_id" => "String", - "filter_is_direct_only" => "Boolean", - "filter_include_service_accounts" => "Boolean", - "filter_keyword" => "String", - "include" => "String", - "sort" => "String", - "page_number" => "Integer", - "page_size" => "Integer", - }, "v2.GetTeamMemberships" => { "team_id" => "String", "page_size" => "Integer", diff --git a/features/v2/given.json b/features/v2/given.json index 1a9686104902..b307445fc2cc 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1961,38 +1961,6 @@ "tag": "Teams", "operationId": "CreateTeamLink" }, - { - "parameters": [ - { - "name": "team_id", - "source": "dd_team_2.data.id" - }, - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"role\": \"admin\"\n },\n \"relationships\": {\n \"user\": {\n \"data\": {\n \"id\": \"{{team_hierarchy_user.data.id}}\",\n \"type\": \"users\"\n }\n }\n },\n \"type\": \"team_memberships\"\n }\n}" - } - ], - "step": "there is a valid \"team_hierarchy_child_membership\" in the system", - "key": "team_hierarchy_child_membership", - "tag": "Teams", - "operationId": "CreateTeamMembership" - }, - { - "parameters": [ - { - "name": "team_id", - "source": "dd_team_2.data.id" - }, - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"role\": \"admin\"\n },\n \"relationships\": {\n \"user\": {\n \"data\": {\n \"id\": \"{{user.data.id}}\",\n \"type\": \"users\"\n }\n }\n },\n \"type\": \"team_memberships\"\n }\n}" - } - ], - "step": "there is a valid \"team_hierarchy_duplicate_membership\" in the system", - "key": "team_hierarchy_duplicate_membership", - "tag": "Teams", - "operationId": "CreateTeamMembership" - }, { "parameters": [ { @@ -2038,18 +2006,6 @@ "tag": "Users", "operationId": "SendInvitations" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"type\": \"users\",\n \"attributes\": {\n \"email\": \"hierarchy-{{ unique }}@datadoghq.com\",\n \"name\": \"Hierarchy member\"\n }\n }\n}" - } - ], - "step": "there is a valid \"team_hierarchy_user\" in the system", - "key": "team_hierarchy_user", - "tag": "Users", - "operationId": "CreateUser" - }, { "parameters": [ { diff --git a/features/v2/teams.feature b/features/v2/teams.feature index 1a14900099e1..4133b1f46ebf 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -378,271 +378,6 @@ Feature: Teams When the request with pagination is sent Then the response status is 200 OK - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members deduplicates direct and inherited membership - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And there is a valid "team_hierarchy_duplicate_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "sort" parameter with value "-is_direct,handle" - And request contains "include" parameter with value "team" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 2 - And the response "meta.page.total" is equal to 2 - And the response "data[0].relationships.user.data.id" is equal to "{{ user.data.id }}" - And the response "data[0].attributes.is_direct" is equal to true - And the response "data[0].attributes.direct_role" is equal to "admin" - And the response "data[1].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" - And the response "data[1].attributes.is_direct" is equal to false - And the response "included" has length 1 - And the response "included[0].id" is equal to "{{ dd_team.data.id }}" - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members filters direct members - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "filter[is_direct_only]" parameter with value true - And request contains "filter[include_service_accounts]" parameter with value false - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].relationships.user.data.id" is equal to "{{ user.data.id }}" - And the response "data[0].attributes.is_direct" is equal to true - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members filters names case insensitively - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "hIeRaRcHy MeMbEr" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members includes inherited users with null root membership attributes - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "include" parameter with value "user,team" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].attributes.is_direct" is equal to false - And the response "data[0].attributes.direct_role" is equal to null - And the response "data[0].attributes.provisioned_by" is equal to null - And the response "data[0].attributes.provisioned_by_id" is equal to null - And the response "data[0].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" - And the response "data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" - And the response "included" has length 2 - And the response "included" has item with field "id" with value "{{ dd_team.data.id }}" - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members normalizes number pagination - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "page[number]" parameter with value -1 - And request contains "page[size]" parameter with value 101 - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "meta.page.number" is equal to 0 - And the response "meta.page.size" is equal to 100 - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members paginates by number and size - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "sort" parameter with value "-is_direct" - And request contains "page[number]" parameter with value 1 - And request contains "page[size]" parameter with value 1 - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].attributes.is_direct" is equal to false - And the response "meta.page.type" is equal to "number_size" - And the response "meta.page.number" is equal to 1 - And the response "meta.page.size" is equal to 1 - And the response "meta.page.total" is equal to 2 - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members rejects unsupported includes - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "include" parameter with value "descendants" - When the request is sent - Then the response status is 400 Bad Request - And the response "errors[0].status" is equal to "400" - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members returns "Bad Request" response - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "sort" parameter with value "invalid" - When the request is sent - Then the response status is 400 Bad Request - And the response "errors[0].status" is equal to "400" - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members returns "Not Found" response - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And request contains "team_id" parameter with value "00000000-0000-4000-8000-000000000000" - When the request is sent - Then the response status is 404 Not Found - And the response "errors[0].status" is equal to "404" - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members returns "OK" response - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ user.data.attributes.email }}" - And request contains "include" parameter with value "user,team" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].id" is equal to "UserTeamRelationship:{{ dd_team.data.id }}:{{ user.data.id }}" - And the response "data[0].type" is equal to "user_team_relationship" - And the response "data[0].attributes.is_direct" is equal to true - And the response "data[0].attributes.direct_role" is equal to "admin" - And the response "data[0].relationships.user.data.type" is equal to "users" - And the response "data[0].relationships.team.data.type" is equal to "teams" - And the response "data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" - And the response "included" has length 2 - And the response "included" has item with field "id" with value "{{ user.data.id }}" - And the response "included" has item with field "id" with value "{{ dd_team.data.id }}" - And the response "meta.page.type" is equal to "offset_limit" - And the response "meta.page.limit" is equal to 100 - And the response "meta.page.total" is equal to 1 - - @replay-only @skip @skip-validation @team:ddoghq/aaa-omg @with-pagination - Scenario: Get team hierarchy members returns "OK" response with pagination - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "page[size]" parameter with value 1 - When the request with pagination is sent - Then the response status is 200 OK - And the response has 2 items - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members returns empty results - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "no-matching-member-{{ unique }}" - And request contains "include" parameter with value "user,team" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 0 - And the response "meta.page.total" is equal to 0 - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members selects number pagination from page size alone - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "page[size]" parameter with value 1 - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "meta.page.type" is equal to "number_size" - And the response "meta.page.number" is equal to 0 - And the response "meta.page.size" is equal to 1 - - @skip @team:ddoghq/aaa-omg - Scenario: Get team hierarchy members sorts inherited members before direct members - Given operation "GetTeamHierarchyMembers" enabled - And new "GetTeamHierarchyMembers" request - And there is a valid "dd_team" in the system - And there is a valid "dd_team_2" in the system - And there is a valid "team_hierarchy_link" in the system - And there is a valid "team_hierarchy_user" in the system - And there is a valid "team_hierarchy_child_membership" in the system - And there is a valid "user" in the system - And there is a valid "team_membership" in the system - And request contains "team_id" parameter from "dd_team.data.id" - And request contains "filter[keyword]" parameter with value "{{ unique }}" - And request contains "sort" parameter with value "is_direct,-name" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 2 - And the response "data[0].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" - And the response "data[1].relationships.user.data.id" is equal to "{{ user.data.id }}" - @team:ddoghq/aaa-omg Scenario: Get team memberships returns "API error response." response Given new "GetTeamMemberships" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 33e6e1e76fe2..aad409ef6342 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -10860,12 +10860,6 @@ "type": "idempotent" } }, - "GetTeamHierarchyMembers": { - "tag": "Teams", - "undo": { - "type": "safe" - } - }, "GetTeamMemberships": { "tag": "Teams", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 5b6e97837b6a..8ad13cb835e7 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -814,7 +814,6 @@ def initialize "v2.update_ai_custom_ruleset": false, "v2.update_custom_ruleset": false, "v2.add_member_team": false, - "v2.get_team_hierarchy_members": false, "v2.list_member_teams": false, "v2.remove_member_team": false, "v2.create_timeseries_anomaly_investigation": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 97a08cab2dd3..f82edae40905 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -8922,27 +8922,6 @@ def overrides "v2.team_hierarchy_link_team_attributes" => "TeamHierarchyLinkTeamAttributes", "v2.team_hierarchy_link_team_relationship" => "TeamHierarchyLinkTeamRelationship", "v2.team_hierarchy_link_type" => "TeamHierarchyLinkType", - "v2.team_hierarchy_member" => "TeamHierarchyMember", - "v2.team_hierarchy_member_attributes" => "TeamHierarchyMemberAttributes", - "v2.team_hierarchy_member_included" => "TeamHierarchyMemberIncluded", - "v2.team_hierarchy_member_relationships" => "TeamHierarchyMemberRelationships", - "v2.team_hierarchy_members_number_page" => "TeamHierarchyMembersNumberPage", - "v2.team_hierarchy_members_number_page_type" => "TeamHierarchyMembersNumberPageType", - "v2.team_hierarchy_members_offset_page" => "TeamHierarchyMembersOffsetPage", - "v2.team_hierarchy_members_offset_page_type" => "TeamHierarchyMembersOffsetPageType", - "v2.team_hierarchy_members_page" => "TeamHierarchyMembersPage", - "v2.team_hierarchy_members_response" => "TeamHierarchyMembersResponse", - "v2.team_hierarchy_members_response_links" => "TeamHierarchyMembersResponseLinks", - "v2.team_hierarchy_members_response_meta" => "TeamHierarchyMembersResponseMeta", - "v2.team_hierarchy_member_team" => "TeamHierarchyMemberTeam", - "v2.team_hierarchy_member_team_attributes" => "TeamHierarchyMemberTeamAttributes", - "v2.team_hierarchy_member_team_data" => "TeamHierarchyMemberTeamData", - "v2.team_hierarchy_member_team_relationship" => "TeamHierarchyMemberTeamRelationship", - "v2.team_hierarchy_member_team_type" => "TeamHierarchyMemberTeamType", - "v2.team_hierarchy_member_type" => "TeamHierarchyMemberType", - "v2.team_hierarchy_member_user" => "TeamHierarchyMemberUser", - "v2.team_hierarchy_member_user_data" => "TeamHierarchyMemberUserData", - "v2.team_hierarchy_member_user_relationship" => "TeamHierarchyMemberUserRelationship", "v2.team_included" => "TeamIncluded", "v2.team_link" => "TeamLink", "v2.team_link_attributes" => "TeamLinkAttributes", diff --git a/lib/datadog_api_client/v2/api/teams_api.rb b/lib/datadog_api_client/v2/api/teams_api.rb index 0f002c5518c3..baf115bb6a37 100644 --- a/lib/datadog_api_client/v2/api/teams_api.rb +++ b/lib/datadog_api_client/v2/api/teams_api.rb @@ -995,119 +995,6 @@ def get_team_hierarchy_link_with_http_info(link_id, opts = {}) return data, status_code, headers end - # Get team hierarchy members. - # - # @see #get_team_hierarchy_members_with_http_info - def get_team_hierarchy_members(team_id, opts = {}) - data, _status_code, _headers = get_team_hierarchy_members_with_http_info(team_id, opts) - data - end - - # Get team hierarchy members. - # - # List the direct and inherited members of a team, deduplicated by user. - # Members of descendant teams are included unless `filter[is_direct_only]` is true. - # Datadog support users are always excluded. - # - # Use `page[number]` and `page[size]` to paginate through the results. - # Invalid query parameters return a JSON:API error with status 400. - # Invalid or unknown team UUIDs return status 404. - # - # @param team_id [String] UUID of the requested root team. - # @param opts [Hash] the optional parameters - # @option opts [Boolean] :filter_is_direct_only Return only direct members. By default, members inherited from descendant teams are also returned. - # @option opts [Boolean] :filter_include_service_accounts Include service accounts. Datadog support users are always excluded. - # @option opts [String] :filter_keyword Filter by a case-insensitive substring of the user name, handle, or email. - # @option opts [String] :include Comma-separated resources to include: `user` and `team`. The included team is the requested team. - # @option opts [String] :sort Comma-separated sort fields: `name`, `handle`, `is_direct`, and `provisioned_by`. Fields are applied in order, each optionally prefixed with `-` for descending order. By default, team admins come first, followed by other direct members, then inherited members, sorted by name within each group. - # @option opts [Integer] :page_number Zero-based page number. Negative values become 0. Defaults to 0. - # @option opts [Integer] :page_size Members per page, from 1 to 100. Values outside this range use the default of 100. - # @return [Array<(TeamHierarchyMembersResponse, Integer, Hash)>] TeamHierarchyMembersResponse data, response status code and response headers - def get_team_hierarchy_members_with_http_info(team_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_team_hierarchy_members".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_team_hierarchy_members") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_team_hierarchy_members")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamsAPI.get_team_hierarchy_members ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsAPI.get_team_hierarchy_members" - end - # resource path - local_var_path = '/api/v2/team/{team_id}/members'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'filter[is_direct_only]'] = opts[:'filter_is_direct_only'] if !opts[:'filter_is_direct_only'].nil? - query_params[:'filter[include_service_accounts]'] = opts[:'filter_include_service_accounts'] if !opts[:'filter_include_service_accounts'].nil? - query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil? - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'TeamHierarchyMembersResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_team_hierarchy_members, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamsAPI#get_team_hierarchy_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get team hierarchy members. - # - # Provide a paginated version of {#get_team_hierarchy_members}, returning all items. - # - # To use it you need to use a block: get_team_hierarchy_members_with_pagination { |item| p item } - # - # @yield [TeamHierarchyMember] Paginated items - def get_team_hierarchy_members_with_pagination(team_id, opts = {}) - api_version = "V2" - page_size = @api_client.get_attribute_from_path(opts, "page_size", 100) - @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) - while true do - response = get_team_hierarchy_members(team_id, opts) - @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } - if @api_client.get_attribute_from_path(response, "data").length < page_size - break - end - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) - end - end - # Get a team link. # # @see #get_team_link_with_http_info diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member.rb deleted file mode 100644 index 1bd51138b416..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member.rb +++ /dev/null @@ -1,186 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A user relationship to the requested team. - class TeamHierarchyMember - include BaseGenericModel - - # Membership attributes relative to the requested team. - attr_reader :attributes - - # Relationship identifier containing the team UUID and user UUID. - attr_reader :id - - # User and requested team linkage. - attr_reader :relationships - - # Team hierarchy membership resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'TeamHierarchyMemberAttributes', - :'id' => :'String', - :'relationships' => :'TeamHierarchyMemberRelationships', - :'type' => :'TeamHierarchyMemberType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMember` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @relationships.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param relationships [Object] Object to be assigned - # @!visibility private - def relationships=(relationships) - if relationships.nil? - fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.' - end - @relationships = relationships - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_attributes.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_attributes.rb deleted file mode 100644 index 6595db91daca..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_attributes.rb +++ /dev/null @@ -1,176 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Membership attributes relative to the requested team. - class TeamHierarchyMemberAttributes - include BaseGenericModel - - # Role on the requested team: admin or member. Null for inherited members. - attr_reader :direct_role - - # Whether the user belongs directly to the requested team. - attr_reader :is_direct - - # Membership provisioner. Null for inherited members. - attr_accessor :provisioned_by - - # Identifier supplied by the membership provisioner. Null when unavailable or for inherited members. - attr_accessor :provisioned_by_id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'direct_role' => :'direct_role', - :'is_direct' => :'is_direct', - :'provisioned_by' => :'provisioned_by', - :'provisioned_by_id' => :'provisioned_by_id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'direct_role' => :'String', - :'is_direct' => :'Boolean', - :'provisioned_by' => :'String', - :'provisioned_by_id' => :'String' - } - end - - # List of attributes with nullable: true - # @!visibility private - def self.openapi_nullable - Set.new([ - :'direct_role', - :'provisioned_by', - :'provisioned_by_id', - ]) - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'direct_role') - self.direct_role = attributes[:'direct_role'] - end - - if attributes.key?(:'is_direct') - self.is_direct = attributes[:'is_direct'] - end - - if attributes.key?(:'provisioned_by') - self.provisioned_by = attributes[:'provisioned_by'] - end - - if attributes.key?(:'provisioned_by_id') - self.provisioned_by_id = attributes[:'provisioned_by_id'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - pattern = Regexp.new(/^(admin|member)$/) - return false if @direct_role !~ pattern - return false if @is_direct.nil? - true - end - - # Custom attribute writer method with validation - # @param direct_role [Object] Object to be assigned - # @!visibility private - def direct_role=(direct_role) - pattern = Regexp.new(/^(admin|member)$/) - if direct_role !~ pattern - fail ArgumentError, "invalid value for \"direct_role\", must conform to the pattern #{pattern}." - end - @direct_role = direct_role - end - - # Custom attribute writer method with validation - # @param is_direct [Object] Object to be assigned - # @!visibility private - def is_direct=(is_direct) - if is_direct.nil? - fail ArgumentError, 'invalid value for "is_direct", is_direct cannot be nil.' - end - @is_direct = is_direct - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - direct_role == o.direct_role && - is_direct == o.is_direct && - provisioned_by == o.provisioned_by && - provisioned_by_id == o.provisioned_by_id && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [direct_role, is_direct, provisioned_by, provisioned_by_id, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_included.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_included.rb deleted file mode 100644 index c4e3a0d78503..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_included.rb +++ /dev/null @@ -1,63 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # An included user or the requested team, distinguished by resource type. - module TeamHierarchyMemberIncluded - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'TeamHierarchyMemberUser', - :'TeamHierarchyMemberTeam' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_relationships.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_relationships.rb deleted file mode 100644 index f58c841b2910..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_relationships.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # User and requested team linkage. - class TeamHierarchyMemberRelationships - include BaseGenericModel - - # Linkage to the requested team. - attr_reader :team - - # Linkage to the user. - attr_reader :user - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'team' => :'team', - :'user' => :'user' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'team' => :'TeamHierarchyMemberTeamRelationship', - :'user' => :'TeamHierarchyMemberUserRelationship' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'team') - self.team = attributes[:'team'] - end - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @team.nil? - return false if @user.nil? - true - end - - # Custom attribute writer method with validation - # @param team [Object] Object to be assigned - # @!visibility private - def team=(team) - if team.nil? - fail ArgumentError, 'invalid value for "team", team cannot be nil.' - end - @team = team - end - - # Custom attribute writer method with validation - # @param user [Object] Object to be assigned - # @!visibility private - def user=(user) - if user.nil? - fail ArgumentError, 'invalid value for "user", user cannot be nil.' - end - @user = user - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - team == o.team && - user == o.user && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [team, user, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_team.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_team.rb deleted file mode 100644 index 82043f2b67b5..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_team.rb +++ /dev/null @@ -1,154 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The requested team, included at most once. Descendant teams are not included. - class TeamHierarchyMemberTeam - include BaseGenericModel - - # Available attributes of the requested team. - attr_accessor :attributes - - # UUID of the requested team. - attr_reader :id - - # Requested team resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'TeamHierarchyMemberTeamAttributes', - :'id' => :'UUID', - :'type' => :'TeamHierarchyMemberTeamType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberTeam` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_attributes.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_team_attributes.rb deleted file mode 100644 index 4b320d76024e..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_attributes.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Available attributes of the requested team. - class TeamHierarchyMemberTeamAttributes - include BaseGenericModel - - # Handle of the team. - attr_accessor :handle - - # Name of the team. - attr_accessor :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'handle' => :'handle', - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'handle' => :'String', - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberTeamAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'handle') - self.handle = attributes[:'handle'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - handle == o.handle && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [handle, name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_data.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_team_data.rb deleted file mode 100644 index 6efb9b49b4e2..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Team resource identifier. - class TeamHierarchyMemberTeamData - include BaseGenericModel - - # UUID of the team. - attr_reader :id - - # Requested team resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'UUID', - :'type' => :'TeamHierarchyMemberTeamType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberTeamData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_relationship.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_team_relationship.rb deleted file mode 100644 index fa0109965b24..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_relationship.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Linkage to the requested team. - class TeamHierarchyMemberTeamRelationship - include BaseGenericModel - - # Team resource identifier. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'TeamHierarchyMemberTeamData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberTeamRelationship` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_type.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_team_type.rb deleted file mode 100644 index 0543d138328b..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_team_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Requested team resource type. - class TeamHierarchyMemberTeamType - include BaseEnumModel - - TEAMS = "teams".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_type.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_type.rb deleted file mode 100644 index 95e02a0e2cb8..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Team hierarchy membership resource type. - class TeamHierarchyMemberType - include BaseEnumModel - - USER_TEAM_RELATIONSHIP = "user_team_relationship".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_user.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_user.rb deleted file mode 100644 index 3c7c01a73db6..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_user.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A user included in the hierarchy members response. - class TeamHierarchyMemberUser - include BaseGenericModel - - # Attributes of user object returned by the API. - attr_reader :attributes - - # UUID of the user. - attr_reader :id - - # Users resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'UserAttributes', - :'id' => :'UUID', - :'type' => :'UsersType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberUser` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_user_data.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_user_data.rb deleted file mode 100644 index 673a98ec9d1a..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_user_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # User resource identifier. - class TeamHierarchyMemberUserData - include BaseGenericModel - - # UUID of the user. - attr_reader :id - - # Users resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'UUID', - :'type' => :'UsersType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberUserData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_member_user_relationship.rb b/lib/datadog_api_client/v2/models/team_hierarchy_member_user_relationship.rb deleted file mode 100644 index 9f40cc362384..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_member_user_relationship.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Linkage to the user. - class TeamHierarchyMemberUserRelationship - include BaseGenericModel - - # User resource identifier. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'TeamHierarchyMemberUserData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMemberUserRelationship` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_number_page.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_number_page.rb deleted file mode 100644 index c9c53c5e4778..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_number_page.rb +++ /dev/null @@ -1,247 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Pagination metadata using number and size. - class TeamHierarchyMembersNumberPage - include BaseGenericModel - - # First page number. - attr_reader :first_number - - # Last page number. Null when unavailable. - attr_accessor :last_number - - # Next page number. Null when unavailable. - attr_accessor :next_number - - # Current zero-based page number. - attr_reader :number - - # Previous page number. Null when unavailable. - attr_accessor :prev_number - - # Maximum number of members per page. - attr_reader :size - - # Total number of members matching the filters. - attr_reader :total - - # Pagination mode. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'first_number' => :'first_number', - :'last_number' => :'last_number', - :'next_number' => :'next_number', - :'number' => :'number', - :'prev_number' => :'prev_number', - :'size' => :'size', - :'total' => :'total', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'first_number' => :'Integer', - :'last_number' => :'Integer', - :'next_number' => :'Integer', - :'number' => :'Integer', - :'prev_number' => :'Integer', - :'size' => :'Integer', - :'total' => :'Integer', - :'type' => :'TeamHierarchyMembersNumberPageType' - } - end - - # List of attributes with nullable: true - # @!visibility private - def self.openapi_nullable - Set.new([ - :'last_number', - :'next_number', - :'prev_number', - ]) - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMembersNumberPage` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'first_number') - self.first_number = attributes[:'first_number'] - end - - if attributes.key?(:'last_number') - self.last_number = attributes[:'last_number'] - end - - if attributes.key?(:'next_number') - self.next_number = attributes[:'next_number'] - end - - if attributes.key?(:'number') - self.number = attributes[:'number'] - end - - if attributes.key?(:'prev_number') - self.prev_number = attributes[:'prev_number'] - end - - if attributes.key?(:'size') - self.size = attributes[:'size'] - end - - if attributes.key?(:'total') - self.total = attributes[:'total'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @first_number.nil? - return false if @number.nil? - return false if @size.nil? - return false if @total.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param first_number [Object] Object to be assigned - # @!visibility private - def first_number=(first_number) - if first_number.nil? - fail ArgumentError, 'invalid value for "first_number", first_number cannot be nil.' - end - @first_number = first_number - end - - # Custom attribute writer method with validation - # @param number [Object] Object to be assigned - # @!visibility private - def number=(number) - if number.nil? - fail ArgumentError, 'invalid value for "number", number cannot be nil.' - end - @number = number - end - - # Custom attribute writer method with validation - # @param size [Object] Object to be assigned - # @!visibility private - def size=(size) - if size.nil? - fail ArgumentError, 'invalid value for "size", size cannot be nil.' - end - @size = size - end - - # Custom attribute writer method with validation - # @param total [Object] Object to be assigned - # @!visibility private - def total=(total) - if total.nil? - fail ArgumentError, 'invalid value for "total", total cannot be nil.' - end - @total = total - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_number == o.first_number && - last_number == o.last_number && - next_number == o.next_number && - number == o.number && - prev_number == o.prev_number && - size == o.size && - total == o.total && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [first_number, last_number, next_number, number, prev_number, size, total, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_number_page_type.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_number_page_type.rb deleted file mode 100644 index cacb453d5990..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_number_page_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Pagination mode. - class TeamHierarchyMembersNumberPageType - include BaseEnumModel - - NUMBER_SIZE = "number_size".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_offset_page.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_offset_page.rb deleted file mode 100644 index 14319492c2ac..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_offset_page.rb +++ /dev/null @@ -1,247 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Pagination metadata using offset and limit. - class TeamHierarchyMembersOffsetPage - include BaseGenericModel - - # First offset. - attr_reader :first_offset - - # Last offset. Null when unavailable. - attr_accessor :last_offset - - # Maximum number of members per page. - attr_reader :limit - - # Next offset. Null when unavailable. - attr_accessor :next_offset - - # Current offset. - attr_reader :offset - - # Previous offset. Null when unavailable. - attr_accessor :prev_offset - - # Total number of members matching the filters. - attr_reader :total - - # Pagination mode. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'first_offset' => :'first_offset', - :'last_offset' => :'last_offset', - :'limit' => :'limit', - :'next_offset' => :'next_offset', - :'offset' => :'offset', - :'prev_offset' => :'prev_offset', - :'total' => :'total', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'first_offset' => :'Integer', - :'last_offset' => :'Integer', - :'limit' => :'Integer', - :'next_offset' => :'Integer', - :'offset' => :'Integer', - :'prev_offset' => :'Integer', - :'total' => :'Integer', - :'type' => :'TeamHierarchyMembersOffsetPageType' - } - end - - # List of attributes with nullable: true - # @!visibility private - def self.openapi_nullable - Set.new([ - :'last_offset', - :'next_offset', - :'prev_offset', - ]) - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMembersOffsetPage` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'first_offset') - self.first_offset = attributes[:'first_offset'] - end - - if attributes.key?(:'last_offset') - self.last_offset = attributes[:'last_offset'] - end - - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.key?(:'next_offset') - self.next_offset = attributes[:'next_offset'] - end - - if attributes.key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.key?(:'prev_offset') - self.prev_offset = attributes[:'prev_offset'] - end - - if attributes.key?(:'total') - self.total = attributes[:'total'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @first_offset.nil? - return false if @limit.nil? - return false if @offset.nil? - return false if @total.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param first_offset [Object] Object to be assigned - # @!visibility private - def first_offset=(first_offset) - if first_offset.nil? - fail ArgumentError, 'invalid value for "first_offset", first_offset cannot be nil.' - end - @first_offset = first_offset - end - - # Custom attribute writer method with validation - # @param limit [Object] Object to be assigned - # @!visibility private - def limit=(limit) - if limit.nil? - fail ArgumentError, 'invalid value for "limit", limit cannot be nil.' - end - @limit = limit - end - - # Custom attribute writer method with validation - # @param offset [Object] Object to be assigned - # @!visibility private - def offset=(offset) - if offset.nil? - fail ArgumentError, 'invalid value for "offset", offset cannot be nil.' - end - @offset = offset - end - - # Custom attribute writer method with validation - # @param total [Object] Object to be assigned - # @!visibility private - def total=(total) - if total.nil? - fail ArgumentError, 'invalid value for "total", total cannot be nil.' - end - @total = total - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_offset == o.first_offset && - last_offset == o.last_offset && - limit == o.limit && - next_offset == o.next_offset && - offset == o.offset && - prev_offset == o.prev_offset && - total == o.total && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [first_offset, last_offset, limit, next_offset, offset, prev_offset, total, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_offset_page_type.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_offset_page_type.rb deleted file mode 100644 index b0057e7069d7..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_offset_page_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Pagination mode. - class TeamHierarchyMembersOffsetPageType - include BaseEnumModel - - OFFSET_LIMIT = "offset_limit".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_page.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_page.rb deleted file mode 100644 index e48329531ecc..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_page.rb +++ /dev/null @@ -1,63 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Pagination metadata for the selected pagination mode. - module TeamHierarchyMembersPage - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'TeamHierarchyMembersOffsetPage', - :'TeamHierarchyMembersNumberPage' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_response.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_response.rb deleted file mode 100644 index edc13b96e29d..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_response.rb +++ /dev/null @@ -1,179 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Direct and inherited members of the requested team. - class TeamHierarchyMembersResponse - include BaseGenericModel - - # One relationship per user. - attr_reader :data - - # Requested users and the team. May be absent when the result is empty, even if requested. - attr_accessor :included - - # Page navigation links. Unavailable links are omitted. - attr_reader :links - - # Pagination metadata for the filtered members. - attr_reader :meta - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data', - :'included' => :'included', - :'links' => :'links', - :'meta' => :'meta' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array', - :'included' => :'Array', - :'links' => :'TeamHierarchyMembersResponseLinks', - :'meta' => :'TeamHierarchyMembersResponseMeta' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMembersResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - - if attributes.key?(:'included') - if (value = attributes[:'included']).is_a?(Array) - self.included = value - end - end - - if attributes.key?(:'links') - self.links = attributes[:'links'] - end - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - return false if @links.nil? - return false if @meta.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Custom attribute writer method with validation - # @param links [Object] Object to be assigned - # @!visibility private - def links=(links) - if links.nil? - fail ArgumentError, 'invalid value for "links", links cannot be nil.' - end - @links = links - end - - # Custom attribute writer method with validation - # @param meta [Object] Object to be assigned - # @!visibility private - def meta=(meta) - if meta.nil? - fail ArgumentError, 'invalid value for "meta", meta cannot be nil.' - end - @meta = meta - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - included == o.included && - links == o.links && - meta == o.meta && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, included, links, meta, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_response_links.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_response_links.rb deleted file mode 100644 index 9cb7bd5bb95d..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_response_links.rb +++ /dev/null @@ -1,145 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Page navigation links. Unavailable links are omitted. - class TeamHierarchyMembersResponseLinks - include BaseGenericModel - - # First page URL. - attr_accessor :first - - # Last page URL. - attr_accessor :last - - # Next page URL. - attr_accessor :_next - - # Previous page URL. - attr_accessor :prev - - # Current page URL. - attr_accessor :_self - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'first' => :'first', - :'last' => :'last', - :'_next' => :'next', - :'prev' => :'prev', - :'_self' => :'self' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'first' => :'String', - :'last' => :'String', - :'_next' => :'String', - :'prev' => :'String', - :'_self' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMembersResponseLinks` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'first') - self.first = attributes[:'first'] - end - - if attributes.key?(:'last') - self.last = attributes[:'last'] - end - - if attributes.key?(:'_next') - self._next = attributes[:'_next'] - end - - if attributes.key?(:'prev') - self.prev = attributes[:'prev'] - end - - if attributes.key?(:'_self') - self._self = attributes[:'_self'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first == o.first && - last == o.last && - _next == o._next && - prev == o.prev && - _self == o._self && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [first, last, _next, prev, _self, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/team_hierarchy_members_response_meta.rb b/lib/datadog_api_client/v2/models/team_hierarchy_members_response_meta.rb deleted file mode 100644 index d0249e62312f..000000000000 --- a/lib/datadog_api_client/v2/models/team_hierarchy_members_response_meta.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Pagination metadata for the filtered members. - class TeamHierarchyMembersResponseMeta - include BaseGenericModel - - # Pagination metadata for the selected pagination mode. - attr_reader :page - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'page' => :'page' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'page' => :'TeamHierarchyMembersPage' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamHierarchyMembersResponseMeta` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'page') - self.page = attributes[:'page'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @page.nil? - true - end - - # Custom attribute writer method with validation - # @param page [Object] Object to be assigned - # @!visibility private - def page=(page) - if page.nil? - fail ArgumentError, 'invalid value for "page", page cannot be nil.' - end - @page = page - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - page == o.page && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [page, additional_properties].hash - end - end -end