# type FirstPartyAudienceSegmentRule (v202602)

**Service** **AudienceSegmentService** **Dependencies** [RuleBasedFirstPartyAudience...](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegment "RuleBasedFirstPartyAudienceSegment") ▼ **FirstPartyAudienceSegmentRule**

Rule of a [FirstPartyAudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment) that defines user's eligibility criteria to be part
of a segment.

*** ** * ** ***

Namespace
:
    `https://www.google.com/apis/ads/publisher/v202602`

| ## Field ||
|---|---|
| ### `inventoryRule` | ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.InventoryTargeting ` Specifies the inventory (i.e. ad units and placements) that are part of the rule of a [FirstPartyAudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment). This attribute is required. |
| ### `customCriteriaRule` | ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteriaSet ` Specifies the collection of custom criteria that are part of the rule of a [FirstPartyAudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment). Once the [FirstPartyAudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment) is updated or modified with custom criteria, the server may return a normalized, but equivalent representation of the custom criteria rule. `customCriteriaRule`will have up to three levels including itself. - The top level [CustomCriteriaSet](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteriaSet) i.e. the `customTargeting` object can only contain a [CustomCriteriaSet.LogicalOperator.OR](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteriaSet.LogicalOperator#OR) of all its children. - The second level of [CustomCriteriaSet](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteriaSet) objects can only contain [CustomCriteriaSet.LogicalOperator.AND](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteriaSet.LogicalOperator#AND) of all their children. If a [CustomCriteria](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteria) is placed on this level, the server will wrap it in a [CustomCriteriaSet](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteriaSet). - The third level can only comprise of [CustomCriteria](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteria) objects. The resulting custom criteria rule would be of the form: ![](https://chart.apis.google.com/chart?cht=gv&chl=digraph%7BcustomTargeting_LogicalOperator_OR-%3ECustomCriteriaSet_LogicalOperator_AND_1-%3ECustomCriteria_1;CustomCriteriaSet_LogicalOperator_AND_1-%3Eellipsis1;customTargeting_LogicalOperator_OR-%3Eellipsis2;ellipsis1%5Blabel%3D%22...%22,shape%3Dnone,fontsize%3D32%5D;ellipsis2%5Blabel%3D%22...%22,shape%3Dnone,fontsize%3D32%5D%7D&chs=450x200) <br /> |