{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-campaign-manager/json-schema/google-campaign-manager-user-roles-list-response-schema.json",
  "title": "UserRolesListResponse",
  "description": "User Role List Response",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-campaign-manager-user-roles-api-openapi.yml#/components/schemas/UserRolesListResponse",
  "properties": {
    "kind": {
      "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#userRolesListResponse\".",
      "type": "string"
    },
    "userRoles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UserRole"
      },
      "description": "User role collection."
    },
    "nextPageToken": {
      "description": "Pagination token to be used for the next list operation.",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "UserRole": {
      "type": "object",
      "properties": {
        "defaultUserRole": {
          "description": "Whether this is a default user role. Default user roles are created by the system for the account/subaccount and cannot be modified or deleted. Each default user role comes with a basic set of preassigned permissions.",
          "type": "boolean"
        },
        "kind": {
          "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#userRole\".",
          "type": "string"
        },
        "permissions": {
          "description": "List of permissions associated with this user role.",
          "items": {
            "$ref": "#/$defs/UserRolePermission"
          },
          "type": "array"
        },
        "subaccountId": {
          "format": "int64",
          "description": "Subaccount ID of this user role. This is a read-only field that can be left blank.",
          "type": "string"
        },
        "accountId": {
          "format": "int64",
          "type": "string",
          "description": "Account ID of this user role. This is a read-only field that can be left blank."
        },
        "name": {
          "type": "string",
          "description": "Name of this user role. This is a required field. Must be less than 256 characters long. If this user role is under a subaccount, the name must be unique among sites of the same subaccount. Otherwise, this user role is a top-level user role, and the name must be unique among top-level user roles of the same account."
        },
        "id": {
          "format": "int64",
          "description": "ID of this user role. This is a read-only, auto-generated field.",
          "type": "string"
        },
        "parentUserRoleId": {
          "format": "int64",
          "type": "string",
          "description": "ID of the user role that this user role is based on or copied from. This is a required field."
        }
      },
      "description": "Contains properties of auser role, which is used to manage user access."
    },
    "UserRolePermission": {
      "description": "Contains properties of a user role permission.",
      "properties": {
        "id": {
          "format": "int64",
          "description": "ID of this user role permission.",
          "type": "string"
        },
        "kind": {
          "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#userRolePermission\".",
          "type": "string"
        },
        "permissionGroupId": {
          "description": "ID of the permission group that this user role permission belongs to.",
          "format": "int64",
          "type": "string"
        },
        "name": {
          "description": "Name of this user role permission.",
          "type": "string"
        },
        "availability": {
          "description": "Levels of availability for a user role permission.",
          "type": "string",
          "enum": [
            "NOT_AVAILABLE_BY_DEFAULT",
            "ACCOUNT_BY_DEFAULT",
            "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT",
            "ACCOUNT_ALWAYS",
            "SUBACCOUNT_AND_ACCOUNT_ALWAYS",
            "USER_PROFILE_ONLY"
          ]
        }
      },
      "type": "object"
    }
  }
}