code: private static ExtensionSettingPlatform getPlatformRestictionsForCampaign(
        CampaignFeed campaignFeed) {
      String platformRestrictions = ExtensionSettingPlatform.NONE.getValue();
  
      if (FunctionOperator.AND.equals(campaignFeed.getMatchingFunction().getOperator())) {
        for (FunctionArgumentOperand argument : campaignFeed.getMatchingFunction().getLhsOperand()) {
          if (argument instanceof FunctionOperand) {
            FunctionOperand operand = (FunctionOperand) argument;
            if (FunctionOperator.EQUALS.equals(operand.getValue().getOperator())
                && (operand.getValue().getLhsOperand(0) instanceof RequestContextOperand)) {
              RequestContextOperand requestContextOperand =
                  (RequestContextOperand) operand.getValue().getLhsOperand(0);
              if (RequestContextOperandContextType.DEVICE_PLATFORM.equals(
                  requestContextOperand.getContextType())) {
                platformRestrictions =
                    ((ConstantOperand) operand.getValue().getRhsOperand(0)).getStringValue();
              }
            }
          }
        }
      }
      return ExtensionSettingPlatform.fromString(platformRestrictions.toUpperCase());
    }
docs: Gets the platform restrictions for sitelinks in a campaign.