{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-workspace/json-schema/google-workspace-search-transitive-groups-response-schema.json",
  "title": "SearchTransitiveGroupsResponse",
  "description": "The response message for MembershipsService.SearchTransitiveGroups.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-workspace-cloudidentity-groups-api-openapi.yml#/components/schemas/SearchTransitiveGroupsResponse",
  "properties": {
    "memberships": {
      "items": {
        "$ref": "#/$defs/GroupRelation"
      },
      "type": "array",
      "description": "List of transitive groups satisfying the query."
    },
    "nextPageToken": {
      "description": "Token to retrieve the next page of results, or empty if there are no more results available for listing.",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "EntityKey": {
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the entity. For Google-managed entities, the `id` should be the email address of an existing group or user. Email addresses need to adhere to [name guidelines for users and groups](https://support.google.com/a/answer/9193374). For external-identity-mapped entities, the `id` must be a string conforming to the Identity Source's requirements. Must be unique within a `namespace`."
        },
        "namespace": {
          "description": "The namespace in which the entity exists. If not specified, the `EntityKey` represents a Google-managed entity such as a Google user or a Google Group. If specified, the `EntityKey` represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of `identitysources/{identity_source}`.",
          "type": "string"
        }
      },
      "description": "A unique identifier for an entity in the Cloud Identity Groups API. An entity can represent either a group with an optional `namespace` or a user without a `namespace`. The combination of `id` and `namespace` must be unique; however, the same `id` can be used with different `namespace`s.",
      "type": "object"
    },
    "GroupRelation": {
      "properties": {
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransitiveMembershipRole"
          },
          "description": "Membership roles of the member for the group."
        },
        "relationType": {
          "description": "The relation between the member and the transitive group.",
          "enum": [
            "RELATION_TYPE_UNSPECIFIED",
            "DIRECT",
            "INDIRECT",
            "DIRECT_AND_INDIRECT"
          ],
          "type": "string"
        },
        "labels": {
          "type": "object",
          "description": "Labels for Group resource.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "groupKey": {
          "$ref": "#/$defs/EntityKey",
          "description": "Entity key has an id and a namespace. In case of discussion forums, the id will be an email address without a namespace."
        },
        "displayName": {
          "description": "Display name for this group.",
          "type": "string"
        },
        "group": {
          "description": "Resource name for this group.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Message representing a transitive group of a user or a group."
    },
    "TransitiveMembershipRole": {
      "description": "Message representing the role of a TransitiveMembership.",
      "type": "object",
      "properties": {
        "role": {
          "description": "TransitiveMembershipRole in string format. Currently supported TransitiveMembershipRoles: `\"MEMBER\"`, `\"OWNER\"`, and `\"MANAGER\"`.",
          "type": "string"
        }
      }
    }
  }
}